﻿Imports System.IO
Imports FileCopyExtensions

Public Class Form1

    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles btn_Copy.Click
        CopyFiles()
    End Sub

    Private Sub btn_cancel_Click(sender As System.Object, e As System.EventArgs) Handles btn_cancel.Click
        FileCopyExtensions_ui_cs1.cancelCopy()
    End Sub

    Private Sub button3_Click(sender As System.Object, e As System.EventArgs) Handles button3.Click
        FileCopyExtensions_ui_cs1.stopCopy()
    End Sub

    Private Sub button4_Click(sender As System.Object, e As System.EventArgs) Handles button4.Click
        CopyFiles()
    End Sub

    Private Sub CopyFiles()
        Dim source, dest As FileInfo

        source = New FileInfo("\\FREEBOX\Disque dur\Vidéos\A Nous Quatre.avi")
        dest = New FileInfo("H:\autre\tmp")

        FileCopyExtensions_ui_cs1.FileSource = source
        FileCopyExtensions_ui_cs1.FolderDestination = dest

        FileCopyExtensions_ui_cs1.runCopy(CopyFileOptions.All)
    End Sub
End Class
